package testWater.service;

import org.springframework.data.domain.Pageable;
import testWater.entity.TestWater;
import testWater.dto.TestWaterDto;
import testWater.query.TestWaterQueryCriteria;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;


/**
 * 业务层接口
 *
 * @author: water
 * @date: 2020-11-02
 * @description:
 */
public interface TestWaterService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(TestWaterQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<TestWaterDto>
    */
    List<TestWaterDto> queryAll(TestWaterQueryCriteria criteria);

    /**
    * 根据ID查询
    * @param id ID
    * @return TestWaterDto
    */
    TestWaterDto findById(Long id);

    /**
    * 创建
    * @param resources /
    * @return TestWaterDto
    */
    TestWaterDto create(TestWater resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(TestWater resources);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<TestWaterDto> all, HttpServletResponse response) throws IOException;

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Long[] ids);
}
